﻿using System;
using System.Windows.Browser;

namespace SilverQuery
{
	public static class Utility
	{
		/// <summary>
		/// Extend one key/value map with one or more others, returning the original, modified, map.
		/// </summary>
		/// <param name="target"></param>
		/// <param name="objects">The collections that will be merged into the first.</param>
		/// <returns></returns>
		public static map extend(map target, params map[] sources)
		{
			foreach (map source in sources)
			{
				foreach (string key in source.Keys)
					target[key] = source[key];
			}
			return target;
		}
	}
}
